//
//  MyCell.m
//  UI13-QQ页面
//
//  Created by dllo on 16/6/22.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MyCell.h"
#define WIDTH  self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@interface MyCell ()
@property (nonatomic,retain)UIImageView *cellImageView;
@property (nonatomic,retain)UILabel *cellNameLable;
@property (nonatomic,retain)UILabel *cellTimeLable;
@property (nonatomic,retain)UILabel *cellContentLable;
@end

@implementation MyCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.cellImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.cellImageView];
        [_cellContentLable release];
        self.cellImageView.backgroundColor = [UIColor grayColor];
        
        self.cellNameLable = [[UILabel alloc]init];
        [self.contentView addSubview:self.cellNameLable];
        [_cellNameLable release];
         self.cellNameLable.backgroundColor = [UIColor grayColor];
        
        self.cellTimeLable = [[UILabel alloc]init];
        [self.contentView addSubview:self.cellTimeLable];
        [_cellTimeLable release];
         self.cellTimeLable.backgroundColor = [UIColor grayColor];
        
        self.cellContentLable = [[UILabel alloc]init];
        [self.contentView addSubview:self.cellContentLable];
        [_cellContentLable release];
         self.cellContentLable.backgroundColor = [UIColor grayColor];
    }
    return self;
}
- (void)layoutSubviews{
    self.cellImageView.frame = CGRectMake(10, 10,  HEIGHT - 20 ,HEIGHT - 20);
    self.cellImageView.layer.cornerRadius = (HEIGHT - 20) / 2;
    self.cellImageView.layer.masksToBounds = YES;
    self.cellNameLable.frame = CGRectMake(HEIGHT , 10, (WIDTH - HEIGHT - 10) * 0.5 , (HEIGHT - 20) / 2 - 5);
    self.cellTimeLable.frame = CGRectMake( HEIGHT + (WIDTH - HEIGHT - 10) * 0.5 +10, 10,(WIDTH - HEIGHT - 10) * 0.5-10 ,(HEIGHT - 30) / 2 );
    self.cellContentLable.frame = CGRectMake(HEIGHT,  (HEIGHT - 20) / 2 +10, WIDTH - HEIGHT - 10, (HEIGHT - 30) / 2);
}



































































@end
